using M13.Game.Item;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace M13.Game.Item.Weapon
{
    public interface IWeapon
    {
        public void Init(ItemProperties itemProperties, WeaponProperties weaponProperties, WeaponResourceConfig weaponResourceConfig);
    }
    public struct WeaponProperties
    {
        public int WeaponDamage { get; private set; }
        public int WeaponStunPower { get; private set; }
        public int MaxDurabilityValue { get; private set; }

        public WeaponProperties(int weaponDamage, int weaponStunPower, int maxDurabilityValue)
        {
            WeaponDamage = weaponDamage;
            WeaponStunPower = weaponStunPower;
            MaxDurabilityValue = maxDurabilityValue;
        }
    }

    public abstract class Weapon : Item, IWeapon
    {
        public WeaponProperties WeaponProperties { get; private set; }
        public WeaponResourceConfig WeaponConfig { get; private set; }

        public virtual void Init(ItemProperties itemProperties, WeaponProperties weaponProperties, WeaponResourceConfig weaponResourceConfig)
        {
            ItemProperties = itemProperties;
            WeaponProperties = weaponProperties;
            WeaponConfig = weaponResourceConfig;
        }
    }
}